#include "EchoServer.h"
#include "Configuration.h"

int main(int argc, char **argv)
{
    Configuration &conf = Configuration::GetConfiguration();
    conf.ReadConfiguration("conf/myconf.conf");
    set<string> IP = conf._configuration["IP"];
    set<string> Port = conf._configuration["Port"];
    set<string> ThreadNum = conf._configuration["ThreadNum"];
    set<string> QueSize = conf._configuration["QueSize"];

    size_t threadNum = std::stoull(*ThreadNum.begin());
    size_t queSize = std::stoull(*QueSize.begin());
    unsigned short port = static_cast<unsigned short>(std::stoi(*Port.begin()));
    EchoServer server(threadNum, queSize, *IP.begin(), port);
    server.start();

    return 0;
}

